/*
 * @Author: Wangtao
 * @Date: 2022-05-17 15:48:15
 * @LastEditors: Wangtao
 * @LastEditTime: 2022-05-17 16:52:23
 */
import knowledgeBaseLabel from '../../../api/config/knowledgeBaseLabel'

/**
 * 获取标签列表
 * @param data {}
 */
export const queryKmTags = ({ commit, state, rootState }, data) => {
  return knowledgeBaseLabel.queryKmTags(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}

export const deleteKmTags = ({ commit, state, rootState }, data) => {
  return knowledgeBaseLabel.deleteKmTags(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}

export const updateKmTag = ({ commit, state, rootState }, data) => {
  return knowledgeBaseLabel.updateKmTag(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}

export const addKmTag = ({ commit, state, rootState }, data) => {
  return knowledgeBaseLabel.addKmTag(data)
    .then(response => {
      return response
    })
    .catch(err => {
      console.error(err)
    })
}
